package de.hsf.bp.netdoc.gui;

import javax.imageio.ImageIO;
import javax.swing.JPanel;
import javax.swing.JButton;
import javax.swing.JLabel;

import java.awt.Font;
import java.awt.Graphics;
import java.awt.Image;

import javax.swing.SwingConstants;

import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.io.File;
import java.io.IOException;

public class Lizenz extends JPanel {
	
	GuiView myGUI;
	public void paintComponent(Graphics g){
	     try {
	          Image img = ImageIO.read(new File("netz.png"));
	          g.drawImage(img, 0, 0, this);
	          g.drawImage(img, 0, 0, this.getWidth(), this.getHeight(), this);
	        } catch (IOException e) {
	          e.printStackTrace();
	          }
	        } 

	/**
	 * Create the panel.
	 */
public Lizenz(GuiView gui){
		
		myGUI = gui;
		setLayout(null);
		
		JButton btnBack = new JButton("Back");
		btnBack.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				myGUI.backToStart();
			}
		});
		btnBack.setBounds(796, 516, 89, 23);
		add(btnBack);
		
		JLabel lblLisenzverwahltung = new JLabel("Lisenzverwahltung");
		lblLisenzverwahltung.setHorizontalAlignment(SwingConstants.CENTER);
		lblLisenzverwahltung.setFont(new Font("Tahoma", Font.BOLD, 15));
		lblLisenzverwahltung.setBounds(263, 11, 200, 42);
		add(lblLisenzverwahltung);

	}

}
